package it.yuzuojian.com.config;

import org.apache.shiro.authz.AuthorizationException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice
public class ShiroExcptionConfig {
    @ExceptionHandler
    public String doException(Exception e){
        if(e instanceof AuthorizationException){
            return  "lessAuthorize";
        }
        return null;
    }
}
